package com.briup.day31;
/**
 * 售票窗口
 * */
public class WindowThread extends Thread {
	
	private static int ticket = 100;

	@Override
	public void run() {
		while (ticket > 0) {
			synchronized (Object.class) {
				System.out.println(Thread.currentThread().getName()
						+"完成一次售票，余票"+--ticket);
				
			}
			
		}
	}
	
	

}
